        <?php

        include_once('../BD/articuloSQL.php');

        function imprimeProducto() {

            $productos = obtieneArticulos();

            echo '
        <div id="producto">
            <table border="1">
                <tr>
                    <th>Producto</th>
                    <th>Puntos</th>
                    <th>Descripci&oacute;n</th>
                    <th>Canjear</th>
                </tr>
        ';

            foreach ($productos as $p) {

                echo '
            <tr>

                <td>' . $p[0] . '</td>
                <td>' . $p[1] . '</td>
                <td>' . $p[2] . '</td>
                <td>                
                <form action="quitarPuntos.php" method="post">
                <input type="submit" value="Canjear" name="Canjear">
                <input type="hidden" value="' . $p[0] . '" name="nombre">
                
                </form>
                </td>

            </tr>';
            }
            echo '</table></div>';
        }
        ?>

